<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no,minimal-ui" name="viewport">
    <title>饱了吗</title>
    <link href="./../images/favico.ico" rel="icon">
    <!--不同屏幕尺寸根字体设置-->
    <script src="./../js/base.js"></script>
    <!--element-ui的样式-->
    <link href="../../backend/plugins/element-ui/index.css" rel="stylesheet" />
    <!-- 引入样式  -->
    <link href="../styles/index.css" rel="stylesheet" />
    <!--本页面内容的样式-->
    <link href="./../styles/pay-success.css" rel="stylesheet" />
</head>

<body>
    <div class="app" id="pay_success">
        <div class="divHead">
            <div class="divTitle">
                <i @click="goBack" class="el-icon-arrow-left"></i> 饱了吗
                <img @click="toMainPage" src="./../images/home.png" />
            </div>
        </div>
        <div class="divContent">
            <img src="./../images/success.png" />
            <div class="divSuccess">下单成功</div>
            <div class="divDesc">预计{{finishTime}}到达</div>
            <div class="divDesc1">后厨正在加紧制作中，请耐心等待~</div>
            <div @click="toOrderPage" class="btnView">查看订单</div>
        </div>
    </div>
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="../../backend/plugins/vue/vue.js"></script>
    <!-- 引入组件库 -->
    <script src="../../backend/plugins/element-ui/index.js"></script>
    <!-- 引入axios -->
    <script src="../../backend/plugins/axios/axios.min.js"></script>
    <script src="./../js/request.js"></script>
    <script>
        new Vue({
            el: "#pay_success",
            data() {
                return {
                    finishTime: ''
                }
            },
            computed: {},
            created() {
                this.getFinishTime()
            },
            mounted() {},
            methods: {
                goBack() {
                    window.requestAnimationFrame(() => {
                        window.location.replace('/front/index.html')
                    })
                },
                toOrderPage() {
                    window.requestAnimationFrame(() => {
                        window.location.replace('/front/page/order.html')
                    })
                },
                toMainPage() {
                    window.requestAnimationFrame(() => {
                        window.location.replace('/front/index.html')
                    })
                },
                //获取送达时间
                getFinishTime() {
                    let now = new Date()
                    let hour = now.getHours() + 1
                    let minute = now.getMinutes()
                    if (hour.toString().length < 2) {
                        hour = '0' + hour
                    }
                    if (minute.toString().length < 2) {
                        minute = '0' + minute
                    }
                    this.finishTime = hour + ':' + minute
                },

            }
        })
    </script>
</body>

</html>